﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using NymphsLib.CommonUtilities.FileSystem;

namespace MovieBrowser.Util
{

    public class SendToThread
    {
        public bool Move { get; set; }
        //public string Source { get; set; }
        //public string Destination { get; set; }

        public List<CopyFileInfo> Movies { get; set; }

        public void SendTo(OverwritePolicy policy)
        {
            try
            {
                FileHelper.CopyAllRecursive(Movies, policy, Move);
            }
            catch (Exception exception)
            {
                MessageBox.Show(@"Problem Sending file.\r\n{0}", exception.Message);
            }
        }

        public void MoveTo()
        {
            try
            {
                FileHelper.Move(Movies);
            }
            catch (Exception exception)
            {
                MessageBox.Show(@"Problem Sending file.\r\n{0}", exception.Message);
            }
        }
    }
}